import { getCoachList, getCoachDetail } from '@/api/coach'
const coach  = {
    state: {
        
    },
    mutations: {
        
    },
    actions: {
        getCoachList ({ commit }) {
            return new Promise((resolve, reject) => {
                getCoachList().then(response => {
                    resolve(response.data)
                }).catch(err => {
                    reject(err)
                })
            })
        },
        getCoachDetail({ commit }, id) {
            return new Promise((resolve, reject) => {
                getCoachDetail(id).then(response => {
                    resolve(response.data)
                }).catch(err => {
                    reject(err)
                })
            })
        }
    }
}

export default coach